<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>属性选择器</title>
    <style type="text/css">
        a {
            color: black;
            text-decoration: none;
        }

        a[target="_blank"] {
            text-decoration: underline;
        }

        a[href^="http"] {
            color: red;
        }

        a[href^="https"] {
            color: blue;
        }
    </style>
</head>
<body>
<div><a href="http://i.chaoxing.com">不安全链接</a></div>
<div><a href="http://i.chaoxing.com">不安全链接</a></div>
<div><a href="http://i.chaoxing.com">不安全链接</a></div>
<div><a href="https://www.baidu.com">安全链接</a></div>
<div><a href="https://www.baidu.com">安全链接</a></div>
<div><a href="https://www.baidu.com">安全链接</a></div>
<div><a href="http://i.chaoxing.com" target="_blank">在新窗口打开不安全</a></div>
<div><a href="https://www.baidu.com" target="_blank">在新窗口打开安全</a></div>
</body>
</html>